package com.fs.jzzn.pojo;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.Formula;

import com.fs.base.pojo.PEntity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * 库存实体
 * @author Administrator
 */
@Entity
@Table(name="p_stock")
@Data@EqualsAndHashCode(callSuper=false)
@AllArgsConstructor
@NoArgsConstructor
public class Stock extends PEntity{
	private String warehouseName;	//仓库名称
	private Integer mCount;			//数量
	private String location;		//库位
	
	private String mNo;//物料编码-唯一性
	private String mName;//物料名称
	private String mType;//物料规格
	private String mUnit;//单位
	private String mKind;//物料类别
	
	@Formula("id")
	private String stockId;
	
	@Transient
	private Integer stockCount;
	
	public Integer getStockCount(){
		return mCount;
	}
}
